package com.neuedu.annotation;

/**
 * @Author: MARK
 * @Date: 2019/7/24 09:57
 * @version: 1.0.0
 * @Description:
 */
public class ClassInfoParse {
    public static void parse(){
        try {
            Class clazz = Class.forName("com.neuedu.annotation.AnnotationTest");
            if(clazz.isAnnotationPresent(ClassInfo.class)){
                ClassInfo classInfo = (ClassInfo)clazz.getAnnotation(ClassInfo.class);
                System.out.println("注解解析器，参数为"+classInfo.name());
            }
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }

    }
}
